-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix possible "The local set of parts of X doesn't look like the set of parts in ZooKeeper" error #30826
Fix possible "The local set of parts of X doesn't look like the set of parts in ZooKeeper" error #30826
Conversation
Fix looks reasonable, but I don't understand why tests fail. |
b1e2e76
to
c6dd365
Compare
Forget to remove remote_replica_path itself. |
|
3ff2fa3
to
b796aab
Compare
…ree::dropReplica()
…f parts in ZooKeeper" error If during removing replica_path from zookeeper, some error occurred (zookeeper goes away), then it may not remove everything from zookeeper. And on DETACH/ATTACH (or server restart, like stress tests does in the analysis from this comment [1]), it will trigger an error: The local set of parts of table test_1.alter_table_4 doesn't look like the set of parts in ZooKeeper: [1]: ClickHouse#28296 (comment) Fix this, by removing "metadata" at first, and only after this everything else, this will avoid this error, since on ATTACH such table will be marked as read-only. v2: forget to remove remote_replica_path itself v3: fix test_drop_replica by adding a check for remote_replica_path existence
b796aab
to
60a4115
Compare
No failures related to changes. |
It will not be marked as readonly, ClickHouse/src/Storages/StorageReplicatedMergeTree.cpp Lines 440 to 452 in 4398a35
|
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix possible "The local set of parts of X doesn't look like the set of parts in ZooKeeper" error (if DROP fails during removing znodes from zookeeper)
Detailed description / Documentation draft:
If during removing replica_path from zookeeper, some error occurred
(zookeeper goes away), then it may not remove everything from zookeeper.
And on DETACH/ATTACH (or server restart, like stress tests does in the
analysis from this comment 1), it will trigger an error:
Fix this, by removing "metadata" at first, and only after this
everything else, this will avoid this error, since on ATTACH such table
will be marked as read-only.
Cc: @alesapin